//
//  ViewController.swift
//  按钮点击水波纹效果
//
//  Created by app on 2017/4/14.
//  Copyright © 2017年 app. All rights reserved.
//

import UIKit

class ViewController: UIViewController {

    var loginButton:MyButton!
    override func viewDidLoad() {
        super.viewDidLoad()
        loginButton = MyButton()
        loginButton.backgroundColor = UIColor.green
        loginButton.frame = CGRect(x: 20, y: 230, width: view.frame.width - 40, height: 50)
        loginButton.setTitle("登录", for: .normal)
        loginButton.addTarget(self, action: #selector(loginAction(sender:evetn:)), for: .touchUpInside)
        view.addSubview(loginButton)
    }
    
    func loginAction(sender:MyButton,evetn:UIEvent) {
       
        sender.startButtonAnimation(msenderBT: sender, movent: evetn)
    }
}

